#include "media/branch/MediaBranchLF.h"

MediaBranchLF::MediaBranchLF(){
    LF_mainWidget->setFixedWidth(145);

    Favora_ListWidget->setSelectionMode(QListWidget::SingleSelection);
    Favora_ListWidget->sortItems(Qt::DescendingOrder);
    Favora_ListWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    Favora_ListWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    Favora_ListWidget->setFocusPolicy(Qt::NoFocus);
    Favora_ListWidget->setSpacing(3);//间距
    Favora_ListWidget->setResizeMode(QListView::Adjust);//适应布局调整
    Favora_ListWidget->setMovement(QListView::Static);//不能移动

    LF_localMeidaLabel->doconfigur_text("本地媒体");
    LF_localMeidaLabel->doconfigur_textsetting(QPoint(5, 0));
    LF_localMeidaLabel->doconfigur_brighttype(NT::DRAWTYPE_RECT);
    LF_localMeidaLabel->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_IGNORERATIO_LOWER, 5, QPoint(4, 0));
    LF_localMeidaLabel->doconfigur_fontgroup(VariableOptionFont);
    LF_localMeidaLabel->doconfigur_colorgroup(foreColorMap);
    LF_localMeidaLabel->doconfigur_backcolorgroup(backColorMap);
    LF_localMeidaLabel->doconfigur_pixmapgroup({{MSEVKEY.WIN_NORMAL, ":/PIXMAP/bench/view-local-nor.png"},
                                                {MSEVKEY.WIN_PRESS, ":/PIXMAP/bench/view-local-hvr.png"}});

    LF_nearMeidaLabel->doconfigur_text("最近播放");
    LF_nearMeidaLabel->doconfigur_textsetting(QPoint(7, 0));
    LF_nearMeidaLabel->doconfigur_brighttype(NT::DRAWTYPE_RECT);
    LF_nearMeidaLabel->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_IGNORERATIO_LOWER, 8, QPoint(4, 0));
    LF_nearMeidaLabel->doconfigur_fontgroup(VariableOptionFont);
    LF_nearMeidaLabel->doconfigur_colorgroup(foreColorMap);
    LF_nearMeidaLabel->doconfigur_backcolorgroup(backColorMap);
    LF_nearMeidaLabel->doconfigur_pixmapgroup({{MSEVKEY.WIN_NORMAL, ":/PIXMAP/bench/view-history-nor.png"},
                                               {MSEVKEY.WIN_PRESS, ":/PIXMAP/bench/view-history-hvr.png"}});

    LF_recordLabel->doconfigur_text("笔记本");
    LF_recordLabel->doconfigur_textsetting(QPoint(7, 0));
    LF_recordLabel->doconfigur_brighttype(NT::DRAWTYPE_RECT);
    LF_recordLabel->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_IGNORERATIO_LOWER, 8, QPoint(4, 0));
    LF_recordLabel->doconfigur_fontgroup(VariableOptionFont);
    LF_recordLabel->doconfigur_colorgroup(foreColorMap);
    LF_recordLabel->doconfigur_backcolorgroup(backColorMap);
    LF_recordLabel->doconfigur_pixmapgroup({{MSEVKEY.WIN_NORMAL, ":/PIXMAP/bench/view-note-nor.png"},
                                            {MSEVKEY.WIN_PRESS, ":/PIXMAP/bench/view-note-hvr.png"}});

    LF_collectLabel->doconfigur_text("我的收藏");
    LF_collectLabel->doconfigur_fontgroup(VariableOptionFont);
    LF_collectLabel->doconfigur_colorgroup({{MSEVKEY.WIN_NORMAL, QColor(89,89,89,220)}});


    Favora_addtionLabel->doconfigur_pixmap(":/PIXMAP/bench/private-addtion.png");
    Favora_addtionLabel->doconfigur_backcolorgroup({{MSEVKEY.WIN_ENTER, QColor(255,255,255,230)}});
    Favora_addtionLabel->doconfigur_brighttype(NT::DRAWTYPE_ROUND);
    Favora_addtionLabel->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_IGNORERATIO_LOWER, 3);
    Favora_addtionLabel->doconfigur_adjustedwidth(true);


    Favora_removeLabel->doconfigur_pixmap(":/PIXMAP/bench/private-remove.png");
    Favora_removeLabel->doconfigur_backcolorgroup({{MSEVKEY.WIN_ENTER, QColor(255,255,255,230)}});
    Favora_removeLabel->doconfigur_brighttype(NT::DRAWTYPE_ROUND);
    Favora_removeLabel->doconfigur_imgsetting(NT::DRAWTYPE_RECT, NT::PIXLOAD_IGNORERATIO_LOWER, 3);
    Favora_removeLabel->doconfigur_adjustedwidth(true);

    LF_collectHbox->addWidget(LF_collectLabel);
    LF_collectHbox->addWidget(Favora_addtionLabel);
    LF_collectHbox->addWidget(Favora_removeLabel, 1);
    LF_collectHbox->setContentsMargins(9,0,0,0);
    LF_collectHbox->setSpacing(2);

    LF_mainVbox->addWidget(LF_localMeidaLabel, 0, Qt::AlignHCenter);
    LF_mainVbox->addWidget(LF_nearMeidaLabel, 0, Qt::AlignHCenter);
    LF_mainVbox->addWidget(LF_recordLabel, 0, Qt::AlignHCenter);
    LF_mainVbox->addLayout(LF_collectHbox);
    LF_mainVbox->addWidget(Favora_ListWidget, 0, Qt::AlignHCenter);

}

